<template>
	<view class="page">
		<view class="pageBg">
			<image src="https://bjsx.gzwhir.com/admin-api/infra/file/18/get/memberbg2.png" mode="aspectFill"></image>
		</view>
		<view class="flex0">
			<u-navbar :fixed='false'  bgColor="transparent" @leftClick="navBack"  title="消息通知">
				<view slot="center" class="navTitle">
					消息通知
				</view>
			</u-navbar>
		</view>
		<view class="flex1">
			<scroll-view scroll-y="true" class="scrollView pt30">
				<view class="pd30 pmain">
					<view class="noticeDetail" v-if="info">
						<view class="content">
							<rich-text :nodes="info.content"></rich-text>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		onShow:function(){
			var pages = getCurrentPages();
			var page = pages[pages.length - 1];
			if(page.options['id']){
				this.$data.itemid = page.options['id'];
			}
		},
		data() {
			return {
				show:false,
				itemid:'101',
				info:{}
			}
		},
		watch:{
			itemid:function(){
				this.getInfo();
			}
		},
		methods: {
			getInfo(){
				var that=this;
				if(that.itemid){
					var res={
						id:101,
						title:'系统任务通知',
						content:`您好！您有新的系统任务，请及时查看并处理！`
					};
					that.info=res;
				}
			}
		},
		mounted(){
			this.getInfo();
		}
	}
</script>

<style lang="scss" scoped>
	.pmain{
		min-height: 100%;
		display: flex;
		flex-direction: column;
	}
	.noticeDetail{
		padding: 50rpx 30rpx;
		background: #fff;
		border-radius: 30rpx;
		flex: 1 1 auto;
		width: 100%;
		box-sizing: border-box;
		
		.tit{
			font-size: 36rpx;
			color: #65554d;
			margin-bottom: 30rpx;
			text-align: center;
			font-weight: bold;
		}
		.content{
			line-height: 1.7;
			font-size: 28rpx;
			color: #65554d;
			min-height: 60vh;
		}
	}
</style>
